import { QUARTER_OPTIONS } from '@supplier/constants/common';

const FORM_ITEM_LIST = [
  {
    prop: 'year',
    label: '年度',
    type: 'year',
  },
  {
    prop: 'quarter',
    label: '季度',
    type: 'select',
    multiple: true,
    clearable: true,
    options: QUARTER_OPTIONS,
  },
  {
    prop: 'rating',
    label: '最终评级',
    type: 'input'
  },
  {
    prop: 'ratingClassification',
    label: '评级分类',
    type: 'input'
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input'
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input'
  },
  {
    prop: 'mainCategoryId',
    label: '主营品类',
    type: 'categorySelect'
  },
  {
    prop: 'managementAreaId',
    label: '管理区域',
    type: 'managementArea'
  },
  {
    prop: 'belongDepartmentId',
    label: '归属中心',
    required: true,
    type: 'select',
    filterable: true,
    dict: 233,
  },
  {
    prop: 'businessContactName',
    label: '业务对接人',
    type: 'input'
  },
]
// 表头
const TABLE_COLUMNS = [
  {
    title: '年度',
    key: 'year'
  },
  {
    title: '季度',
    key: 'quarter'
  },
  {
    title: '最终评级',
    key: 'rating'
  },
  {
    title: '评级分类',
    key: 'ratingClassification'
  },
  {
    title: '供应商代码',
    key: 'supplierCode'
  },
  {
    title: '供应商名称',
    key: 'supplierName',
  },
  {
    title: '主营品类代码',
    key: 'mainCategoryCode',
  },
  {
    title: '主营品类名称',
    key: 'mainCategory',
  },
  {
    title: '供应商管理区域',
    key: 'supplierManagerAreaName',
  },
  {
    title: '归属中心',
    key: 'belongDepartmentName',
  },
  {
    title: '业务对接人',
    key: 'businessContactName',
  },
  {
    title: '成本控制能力',
    key: 'costAbility',
    children: [
      {
        title: '价格核查问题次数',
        key: 'priceVerificationIssues',
      },
      {
        title: '项目总分',
        key: 'costAbilityTotalScore',
      },
      {
        title: '评级',
        key: 'costAbilityRating',
      },
    ]
  },
  {
    title: '订单交付能力',
    key: 'orderDelivery',
    children: [
      {
        title: '产品交付及时率',
        key: 'productDeliveryTimeliness',
      },
      {
        title: '产品交付及时率得分',
        key: 'productDeliveryTimelinessScore',
      },
      {
        title: '产品交付满足率',
        key: 'productDeliverySatisfaction',
      },
      {
        title: '产品交付满足率得分',
        key: 'productDeliverySatisfactionScore',
      },
      {
        title: '项目总得分',
        key: 'orderDeliveryTotalScore',
      },
      {
        title: '评级',
        key: 'orderDeliveryRating',
      },
    ]
  },
  {
    title: '质量管控能力',
    key: 'quality',
    children: [
      {
        title: '质量验收不合格次数',
        key: 'qualityAcceptanceFailures',
      },
      {
        title: '质量验收不合格得分',
        key: 'qualityAcceptanceFailuresScore',
      },
      {
        title: '质量问题退货次数',
        key: 'qualityIssueReturns',
      },
      {
        title: '质量问题退货得分',
        key: 'qualityIssueReturnsScore',
      },
      {
        title: '质量问题索赔次数',
        key: 'qualityIssueClaims',
      },
      {
        title: '质量问题索赔得分',
        key: 'qualityIssueClaimsScore',
      },
      {
        title: '项目总得分',
        key: 'qualityControlTotalScore',
      },
      {
        title: '评级',
        key: 'qualityControlRating',
      },
    ]
  },
  {
    title: '财务能力',
    key: 'financial',
    children: [
      {
        title: '账期得分',
        key: 'paymentTermsScore',
      },
      {
        title: '铺底得分',
        key: 'bottomingScore',
      },
      {
        title: '承兑得分',
        key: 'acceptanceScore',
      },
      {
        title: '项目总得分',
        key: 'financialAbilityTotalScore',
      },
      {
        title: '评级',
        key: 'financialAbilityRating',
      },
    ]
  },
  {
    title: '服务能力',
    key: 'costAbility',
    children: [
      {
        title: '资质/样品未按时按质提供次数',
        key: 'qualificationSampleDelays',
      },
      {
        title: '资质/样品得分',
        key: 'qualificationSampleScore',
      },
      {
        title: '报价及时率',
        key: 'quotationTimeliness',
      },
      {
        title: '报价及时率得分',
        key: 'quotationTimelinessScore',
      },
      {
        title: '是否协同',
        key: 'synergyName',
      },
      {
        title: '是否协同得分',
        key: 'synergyScore',
      },
      {
        title: '是否纳入政府失信名单',
        key: 'governmentDishonestyName',
      },
      {
        title: '得分',
        key: 'governmentDishonestyScore',
      },
      {
        title: '经营或者诉讼风险次数',
        key: 'businessLawsuitRisk',
      },
      {
        title: '得分',
        key: 'businessLawsuitRiskScore',
      },
      {
        title: '项目总得分',
        key: 'serviceAbilityTotalScore',
      },
      {
        title: '评级',
        key: 'serviceAbilityRating',
      },
    ]
  },
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS,
}
